/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	Viewport.h
*
*	Description -	Viewport
*
*	Comments	-	
*
*	Modification History:
*			Name			   Date					Description
*			MrCodeSushi	-	05/21/2011	-	Creation of this file
**************************************************************************************/
#ifndef _PSX_VIEWPORT_H_
#define _PSX_VIEWPORT_H_

#include "PulseSTD.h"
#include "2D.h"

namespace Pulse
{
	struct Viewport
	{
		Viewport() { }

		Viewport( FLOAT _topLeftX, FLOAT _topLeftY, FLOAT _width, FLOAT _height, FLOAT _minDepth = 0.0f, FLOAT _maxDepth = 1.0f )
			: topLeftX( _topLeftX ), topLeftY( _topLeftY ), width( _width ), height( _height ), minDepth( _minDepth ), maxDepth( _maxDepth )
		{
		}

		void Set( FLOAT _topLeftX, FLOAT _topLeftY, FLOAT _width, FLOAT _height, FLOAT _minDepth = 0.0f, FLOAT _maxDepth = 1.0f )
		{
			topLeftX	= _topLeftX;
			topLeftY	= _topLeftY;
			width		= _width;
			height		= _height;
			minDepth = _minDepth;
			maxDepth = _maxDepth;
		}

		BOOL operator == ( const Viewport &rhs ) const
		{
			return topLeftX == rhs.topLeftX && topLeftY == rhs.topLeftY &&
				width == rhs.width && height == rhs.height && minDepth == rhs.minDepth &&
				maxDepth == rhs.maxDepth;
		}

		BOOL operator != ( const Viewport &rhs ) const
		{
			return !(*this == rhs);
		}

		FLOAT topLeftX;
		FLOAT topLeftY;
		FLOAT width;
		FLOAT height;
		FLOAT minDepth;
		FLOAT maxDepth;
	};
}

#endif /* _PSX_VIEWPORT_H_ */
